/*
 * @Description: 条目检索title显示
 * @Author: Zzt
 * @Date: 2022-09-08 17:09:43
 * @LastEditTime: 2023-03-09 15:49:22
 */

import { Button, Space, Tag } from 'antd';
import { HeartOutlined } from '@ant-design/icons';

import PorListTitle from '../styles/PorListTitle.module.scss';
import classNames from 'classnames/bind';

const cx = classNames.bind(PorListTitle);

const EntryTitle = (props: any) => {
  const { dataIndex, infoMore, ResultInfo, message, fields } = props;

  return (
    <div className={cx('titleOut')}>
      <div className={cx('titleInone')}>
        <div>
          {dataIndex.title}
          {/* 视频需要，暂时屏蔽 */}
          <Space size={0}>
            <Tag color="blue">关联：{}</Tag>
          </Space>
        </div>
        <div>
          {/* 视频需要，暂时屏蔽 */}
          {/* <Popover content={content(dataIndex)} title={null} placement="bottom">
            <Button type="link">
              所属层级
              <CaretDownOutlined />
            </Button>
          </Popover> */}
          <Button icon={<HeartOutlined />} type="link"></Button>
        </div>
      </div>
      <div className={cx('titleIntwo')}>
        <ResultInfo info={message(dataIndex)} fields={fields.slice(0, 3)} />
        <div>
          {fields.length > 3 ? (
            <Button type="link" onClick={() => infoMore(dataIndex)}>
              更多著录
            </Button>
          ) : (
            ''
          )}
        </div>
      </div>
    </div>
  );
};
export default EntryTitle;
